A party pooper is someone who spoils a cheerful mood, especially by being gloomy or refusing to participate. If you call the cops when the music gets too loud, you just might be a party pooper yourself!
You can also call a party pooper a spoilsport or a killjoy — party poopers spoil other people's fun. You can take this role by leaving a gathering early, turning the music down at a party, refusing to play a game, or simply by scowling grouchily at an otherwise cheery event. This informal term has been used since about 1950, when it was first coined in the United States.